package com.tsmti.core.common.constant;


/**
 * Title：PimsSystem
 * Class：com.tsmti.core.common.entity
 * Comapny:
 *
 * @author：zcw
 * @version：2.5 CreateTime：2018/1/16 11:19
 * Modify log:
 * Description：
 */
public final class Constants {
    public static final String SPACE = " ";
    public static final String EMPTY = "";
    public static final String COMMA = ",";
    public static final String POINT = ".";
    public static final String NULL = "null";
    public static final String SORT_ASC = "asc";
    public static final String SORT_DESC = "desc";
    /**
     * 一到十数字-字符型
     */
    public static final String STRING_ZERO = "0";
    public static final String STRING_ONE = "1";
    public static final String STRING_TWO = "2";
    public static final String STRING_THREE = "3";
    public static final String STRING_FOUR = "4";
    public static final String STRING_FIVE = "5";
    public static final String STRING_SIX = "6";
    public static final String STRING_SEVEN = "7";
    public static final String STRING_EIGHT = "8";
    public static final String STRING_NINE = "9";
    public static final String STRING_TEN = "10";
    /**
     * 负数，一到四数字-字符型
     */
    public static final String STRING_NEGATIVE_ONE = "-1";
    public static final String STRING_NEGATIVE_TWO = "-2";
    public static final String STRING_NEGATIVE_THREE = "-3";
    public static final String STRING_NEGATIVE_FOUR = "-4";

    /**
     * 负二到十数字-数值型
     */
    public static final Integer NEGATIVE_TWO = -2;
    public static final Integer NEGATIVE_ONE = -1;
    public static final Integer ZERO = 0;
    public static final Integer ONE = 1;
    public static final Integer TWO = 2;
    public static final Integer THREE = 3;
    public static final Integer FOUR = 4;
    public static final Integer FIVE = 5;
    public static final Integer SIX = 6;
    public static final Integer SEVEN = 7;
    public static final Integer EIGHT = 8;
    public static final Integer NINE = 9;
    public static final Integer TEN = 10;
    public static final Integer ELEVEN = 11;
    public static final Integer TWENTY = 20;

    public static final String MAN = "男";
    public static final String WOMEN = "女";
    /**
     * SQL条件
     */
    public static final String EQ = "eq";
    public static final String GT = "gt";
    /**
     * 保存用户到SESSION
     */
    public static final String USER_SESSION = "USER_SESSION";

    /**
     * 人员类型
     */
    /**
     * 正常
     */

    public static final Short USER_NORMAL = 1;
    /**
     * 禁用
     */
    public static final Short USER_FORBIDDEN = 0;
    /**
     * 超级管理员
     */
    public static final Short USER_ADMIN = -1;

    /**
     * 逻辑删除标记
     * 0正常 1删除
     */
    public static final Integer DEL_FLAG_NORMAL = 0;
    public static final Integer DEL_FLAG_DELETE = 1;

    /**
     * 日志级别定义
     */
    public static final Short LOG_LEAVEL_INFO = 1;
    public static final Short LOG_LEAVEL_WARRING = 2;
    public static final Short LOG_LEAVEL_ERROR = 3;
    /**
     * 日志类型
     */

    /**
     * 登陆
     */
    public static final Short LOGTYPE_LOGIN = 1;

    /**
     * 退出
     */
    public static final Short LOGTYPE_EXIT = 2;
    /**
     * 插入
     */
    public static final Short LOGTYPE_INSERT = 3;
    /**
     * 删除
     */
    public static final Short LOGTYPE_DEL = 4;

    /**
     * 更新
     */
    public static final Short LOGTYPE_UPDATE = 5;
    /**
     * 上传
     */
    public static final Short LOGTYPE_UPLOAD = 6;
    /**
     * 其他
     */
    public static final Short LOGTYPE_OTHER = 7;


    public static final Short FUNCTION_LEAVE_ONE = 0;
    /**
     * 权限等级 二级权限
     */
    public static final Short FUNCTION_LEAVE_TWO = 1;

    /**
     * 权限等级前缀 一级
     */
    public static final String FUNCTION_ORDER_ONE = "ofun";
    /**
     * 权限等级前缀 二级
     */
    public static final String FUNCTION_ORDER_TWO = "tfun";
    /**
     * 权限类型
     */
    /**
     * 页面（菜单：菜单类型）
     */
    public static final Short FUNCTION_TYPE_PAGE = 0;
    /**
     * 表单/或者弹出（菜单：访问类型）
     */
    public static final Short FUNCTION_TYPE_FORM = 1;
    /**
     * 没有勾选的操作code
     */
    public static final String NOAUTO_OPERATIONCODES = "noauto_operationCodes";
    /**
     * 勾选了的操作code
     */
    public static final String OPERATIONCODES = "operationCodes";


    /**
     * 权限类型 页面
     */
    public static final Short OPERATION_TYPE_HIDE = 0;
    /**
     * 权限类型 表单/或者弹出
     */
    public static final Short OPERATION_TYPE_DISABLED = 1;

    /**
     * 权限类型 菜单
     */
    public static final Short MENU_TYPE_MENU = 1;

    /**
     * 权限类型 按钮
     */
    public static final Short MENU_TYPE_BUTTON = 2;

    /**
     * 数据权限 - 菜单数据规则集合
     */
    public static final String MENU_DATA_AUTHOR_RULES = "MENU_DATA_AUTHOR_RULES";
    /**
     * 数据权限 - 菜单数据规则sql
     */
    public static final String MENU_DATA_AUTHOR_RULE_SQL = "MENU_DATA_AUTHOR_RULE_SQL";


    /**
     * 配置系统是否开启按钮权限控制
     */
    public static boolean BUTTON_AUTHORITY_CHECK = false;

    public static final String CACHE_DICT_MAP = "cacheDictMap";
    public static final String CURRENT_USER = "systemuser";
    public static final String CURRENT_USERNAME = "systemusername";
    public static final String SESSION_FORCE_LOGOUT_KEY = "session.force.logout";

    public static final String ERROR = "error";


    public final static String QUERYMODE_RADIO = "radio";
    public final static String QUERYMODE_CHECKBOX = "checkbox";

    public final static String EDITTYPE_SELECT = "select";
    public final static String EDITTYPE_DATE = "date";

    public final static String LOCALNAME_QUERY = "query";
    public final static String LOCALNAME_QUERY_PREFIX = "query_";
    public final static String LOCALNAME_LABEL = "label";
    public final static String LOCALNAME_TITLE = "title";
    public final static String LOCALNAME_CONDITION = "condition";

    public final static String FUNCTION_CREATE = "create";
    public final static String FUNCTION_DELETE = "delete";
    public final static String FUNCTION_UPDATE = "update";
    public final static String FUNCTION_SERARCH = "search";
    public final static String FUNCTION_RESET = "rest";

    /**
     * 是否类型
     */
    public enum YESNO{
        /**
         * 是
         */
        YES("1"),
        /**
         * 否
         */
        NO("0");
        private String value;

        private YESNO(String value){
            this.value=value;
        }
        public String getValue(){
            return value;
        }
    }
    /**
     * 返回状态值
     */
    public enum RESULT {
        /*** 成功*/
        CODE_YES("0"),
        /*** 失败*/
        CODE_NO("-1"),
        /*** 失败msg*/
        MSG_YES("操作成功"),
        /*** 失败msg*/
        MSG_NO("操作失败");
        private String value;

        RESULT(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }
    /**
     * 日期类型，年、月、天、小时
     */
    public static final String DATETYPE_YEAR = "y";
    public static final String DATETYPE_MONTH = "m";
    public static final String DATETYPE_DAY = "d";
    public static final String DATETYPE_HOUR = "h";
    /**
     * 计费模式    1 计费 2 退费
     */
    public final static String CHARGE =  "1";
    public final static String RETURN =  "2";
    /**
     * JSP
     */
    public static final String JSP = ".jsp";
    /**
     * 斜杠字符串
     */
    public static final String SLASH = "/";
    /**
     *斜杆char
     */
    public static final char SLASHCHAR = '/';
    /**
     * STOP
     */
    public static final String STOP = "stop";
    /**
     * START
     */
    public static final String START = "start";
    /**
     * STOP
     */
    public static final String END = "END";
    /**
     * 1024
     */
    public static final int READ_NUM = 1024;
    /**
     * userType
     */
    public static final String USER_TYPE = "userType";
    /**
     * userTask
     */
    public static final String USER_TASK = "userTask";
    /**
     * type
     */
    public static final String TYPE = "type";
    /**
     * 五
     */
    public static final String FIVE_STR = "5";
    /**
     * 斜杠
     */
    public static final String SLASHSTRING = "/";
    /**
     * 冒号
     */
    public static final String COLON =":";
    /**
     *EXCEPTION
     */
    public static final String EXCEPTION = "exception";
    /**
     * ERROR_EXCEPTION
     */
    public static final String ERROR_EXCEPTION = "javax.servlet.error.exception";
    /**
     * unknown
     */
    public static final String UNKNOWN = "unknown";
    /**
     * PREFIX
     */
    public static final String PREFIX = "PREFIX";
    /**
     * SUFFIX
     */
    public static final String SUFFIX = "SUFFIX";
    /**
     * data
     */
    public static final String DATA = "data";
    /**
     * jqgrid
     */
    public static final String JQGRID = "jqgrid";
    /**
     * 字母 数字 下划线 点 `
     */
    public static final String REGEX_LETTER = "[a-zA-Z0-9_、.`\"]*";
    /**
     * 左中括号
     */
    public static final String LEFT_BRACKETS_MAKS = "['";
    /**
     * 左中括号斜杠
     */
    public static final String LEFT_BRACKETS_SLASH = "[\"";
    /**
     * 右中括号点
     */
    public static final String RIGHT_BRACKETS_POINT = "].";
    /**
     * 点
     */
    public static final char POINT_CHAR = '.';
    /**
     * 左中括
     */
    public static final char LEFT_BRACKETS_CHAR = '[';
    /**
     * SPRINGFRAMEWORK
     */
    public static final String SPRINGFRAMEWORK = "org.springframework";
    /**
     * SERVLET
     */
    public static final String SERVLET = "javax.servlet";
    /**
     * __cookie
     */
    public static final String COOKIE = "__cookie";
    /**
     * .0
     */
    public static final String POINT_ZERO = ".0";
    /**
     * 问号
     */
    public static final String UNKNOWN_MARK = "?";
    /**
     * class
     */
    public static final String CLASS_STRING = "class";
    /**
     * outclass
     */
    public static final String OUT_CLASS = "outclass";
    /**
     * innerclass
     */
    public static final String INNER_CLASS = "innerclass";
    /**
     * CSS
     */
    public static final String CSS = "CSS";
    /**
     * JS
     */
    public static final String JS = "JS";
    /**
     * FRAGMENT
     */
    public static final String FRAGMENT = "FRAGMENT";
    /**
     * 2.0
     */
    public static final String TWO_POINT_ZERO = "2.0";
}
